package profit

import (
	"context"
	profitRepo "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/infrastructure/repository/base/profit"
	basePb "git.mycaigou.com/gfyx/micro-gfyx-oppty-service/proto/micro_gfyx_oppty_service_proto/micro-gfyx-oppty-service/base"
	"time"
)

type ProfitServiceIface interface {
	// CalculateProfitAccountNum 计算租户权益账号数量
	CalculateProfitAccountNum(ctx context.Context) error
	// GetTenantProfit 获取权益模块
	GetTenantProfit(ctx context.Context) ([]string, error)
	// GetTenantProfitList 获取租户权益列表
	GetTenantProfitList(ctx context.Context) ([]*profitRepo.GfyxProfitPo, error)
	// SyncProfit 建模出库时调用该方法同步旧表的权益到新的权益表
	SyncProfit(ctx context.Context, profit *profitRepo.GfyxProfitPo) error
	// SaveTenantProfit 租户出库，保存权益
	SaveTenantProfit(ctx context.Context, profit *basePb.SaveTenantProfitRequest) (*basePb.SaveTenantProfitResponse, error)
	// GetProfitProvince 获取（省份）数据权限
	GetProfitProvince(ctx context.Context) ([]string, error)
	// SaveProfitProvince 设置（省份）数据权限
	SaveProfitProvince(ctx context.Context, provinceCode []string) error
	// CalculateTenantProfitExportNum 计算租户可用导出数据量,和租期的开始结束时间
	CalculateTenantProfitExportNum(ctx context.Context) (num int32, st time.Time, et time.Time, err error)
}
